<div class="card" style="min-height:250px;">
  <div id="alarmCountChart" style="width: 100%;height:300px;padding-top:10px;"></div> 
</div>
<script src="/echarts/echarts.common.min.js"></script>
<script type="text/javascript">
    Dcat.ready(function () {
        var alarmCountChart = echarts.init(document.getElementById('alarmCountChart'));
        var option;

        option = {
          tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'shadow'
    }
  },
  xAxis: {
    type: 'category',
    data: {!! $xData !!}
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: {!! $yData !!},
      type: 'bar'
    }
  ]
};

        option && alarmCountChart.setOption(option);
    });
</script>